#ifndef SAFESTATECHECK_H
#define SAFESTATECHECK_H

#include <set>
#include "robot.h"

class SafeStateCheck
{
    bool robotOnStage;
    Robot* grantedRobot;
    std::list<Robot*> robots;

public:
    std::list<Cell*> safetyCheckCells;
    Cell* getFirstPrivate(Robot* robot);
    void adjustSafetyCheckCells();
    void removeSafetyCellsFor(Robot*robot);
    bool isNextStateSafe(Robot * robot);
    void grantRobotSafetyCheckCell();
    SafeStateCheck(Robot* robot,std::list<Robot*> robotlist);
    std::list<Cell*> getSafetyRobotPath(Robot* robot);
    void printSafetyCheckCells();
    void setGrantedRobot();
};

#endif // SAFESTATECHECK_H
